#ifndef _CCONFIGFILE_H_
#define _CCONFIGFILE_H_

/**

  This is the Config File class

  */
class CConfigFile
{
private:
	int m_numValues;
	int m_maxValues;
	char **m_keys;
	double *m_values;
	char *m_lastFile;
	
	int findKey(const char *key);
	void releaseData();
public:
	/**
	Creates the configuration file
	*/
	CConfigFile();
	
	/**
	Destroys the configuration file
	*/
	~CConfigFile();
	
	/**
	Reads and parses a <i>config file< /i>.
	\param file The file name
	*/
	int readConfig(const char *file);
	int writeConfig(const char *file);
	double getValue(const char *name);
	void setValue(const char *name, double value);
	void setValue(const char *name, double value, int now);
};

#endif //_CCONFIGFILE_H_